Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎉 Destination Oracle - Added support for connection via ssh tunnel #6370

Merged
merged 9 commits into from
Sep 28, 2021

Conversation

VitaliiMaltsev
Copy link
Contributor

@VitaliiMaltsev VitaliiMaltsev commented Sep 22, 2021

What

The goal of this PR is to add SSH only for the Oracle Destination. It does not try to deal with how it can be reused for other sources or destinations.

How

Handles injecting the SSH tunnel in the spec, check, getConsumer methods of Oracle Destination directly. This makes it relatively straightforward to inject without worrying about touching other jdbc dbs.

Tested with AWS EC2 bastion and RDS Oracle:
oracle_spec

oracle_dest_ssh

postgres_tables
or
oracle_tables
der

Recommended reading

  1. x.java
  2. y.python

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • Community member? Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • docs/SUMMARY.md
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • PR name follows PR naming conventions
  • Connector added to connector index like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions
  • Connector version bumped like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

Connector Generator

  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • If adding a new generator, add it to the list of scaffold modules being tested
  • The generator test modules (all connectors with -scaffold in their name) have been updated with the latest scaffold by running ./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates then checking in your changes
  • Documentation which references the generator is updated as needed.

@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Sep 22, 2021
@VitaliiMaltsev VitaliiMaltsev temporarily deployed to more-secrets September 22, 2021 09:34 Inactive
@VitaliiMaltsev VitaliiMaltsev temporarily deployed to more-secrets September 22, 2021 10:26 Inactive
@VitaliiMaltsev VitaliiMaltsev changed the title Vmaltsev/5969 oracle destination ssh tunnel tada Destination Oracle - Added support for connection via ssh tunnel Sep 22, 2021
@VitaliiMaltsev VitaliiMaltsev temporarily deployed to more-secrets September 22, 2021 11:55 Inactive
@VitaliiMaltsev VitaliiMaltsev changed the title tada Destination Oracle - Added support for connection via ssh tunnel Destination Oracle - Added support for connection via ssh tunnel Sep 22, 2021
@VitaliiMaltsev VitaliiMaltsev changed the title Destination Oracle - Added support for connection via ssh tunnel tadaDestination Oracle - Added support for connection via ssh tunnel Sep 22, 2021
@VitaliiMaltsev VitaliiMaltsev changed the title tadaDestination Oracle - Added support for connection via ssh tunnel 🎉 Destination Oracle - Added support for connection via ssh tunnel Sep 22, 2021
@VitaliiMaltsev VitaliiMaltsev linked an issue Sep 23, 2021 that may be closed by this pull request
@VitaliiMaltsev VitaliiMaltsev requested review from etsybaev and removed request for DoNotPanicUA September 24, 2021 10:17
@VitaliiMaltsev VitaliiMaltsev marked this pull request as ready for review September 24, 2021 10:29
Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but can you use the container approach?

@@ -130,6 +130,8 @@ jobs:
MIXPANEL_INTEGRATION_TEST_CREDS: ${{ secrets.MIXPANEL_INTEGRATION_TEST_CREDS }}
MSSQL_RDS_TEST_CREDS: ${{ secrets.MSSQL_RDS_TEST_CREDS }}
PAYPAL_TRANSACTION_CREDS: ${{ secrets.SOURCE_PAYPAL_TRANSACTION_CREDS }}
ORACLE_SSH_KEY_TEST_CREDS: ${{ secrets.ORACLE_SSH_KEY_TEST_CREDS }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we instead use the approach you took in #5811 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, i'll modify on container approach once #6312 will be merged

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sherifnada I changed the integration tests for the bastion container approach

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sherifnada also how do you think maybe we need to create separate tasks to also change the integration tests for Oracle Source, MySQL Source and Destination, MSSQL Source and Destination with docker bastion container?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VitaliiMaltsev yup let's create issues on the backlog to do this, and make sure with the team that any new SSH implementations follow the bastion approach

cc @alexandr-shegeda

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


vmaltsev seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@VitaliiMaltsev VitaliiMaltsev temporarily deployed to more-secrets September 27, 2021 17:18 Inactive
@VitaliiMaltsev VitaliiMaltsev temporarily deployed to more-secrets September 28, 2021 08:40 Inactive
@VitaliiMaltsev
Copy link
Contributor Author

VitaliiMaltsev commented Sep 28, 2021

/publish connector=connectors/destination-oracle

🕑 connectors/destination-oracle https://github.com/airbytehq/airbyte/actions/runs/1282221745
❌ connectors/destination-oracle https://github.com/airbytehq/airbyte/actions/runs/1282221745

@VitaliiMaltsev VitaliiMaltsev temporarily deployed to more-secrets September 28, 2021 10:49 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets September 28, 2021 10:51 Inactive
@VitaliiMaltsev
Copy link
Contributor Author

VitaliiMaltsev commented Sep 28, 2021

/publish connector=connectors/destination-oracle

🕑 connectors/destination-oracle https://github.com/airbytehq/airbyte/actions/runs/1282245458
✅ connectors/destination-oracle https://github.com/airbytehq/airbyte/actions/runs/1282245458

@VitaliiMaltsev VitaliiMaltsev temporarily deployed to more-secrets September 28, 2021 10:58 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets September 28, 2021 11:00 Inactive
@VitaliiMaltsev VitaliiMaltsev merged commit c256114 into master Sep 28, 2021
@VitaliiMaltsev VitaliiMaltsev deleted the vmaltsev/5969-oracle-destination-ssh-tunnel branch September 28, 2021 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support & test cases for Oracle Destination via SSH tunnels
5 participants